package com.ruoyi.system.service.impl;

import java.util.List;

import com.ruoyi.common.annotation.AutoFill;
import com.ruoyi.common.enums.AutoFillType;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.DispatchPumpSiteRelationsMapper;
import com.ruoyi.system.domain.DispatchPumpSiteRelations;
import com.ruoyi.system.service.IDispatchPumpSiteRelationsService;

/**
 * 机泵 - 站点关联Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-03-02
 */
@Service
public class DispatchPumpSiteRelationsServiceImpl implements IDispatchPumpSiteRelationsService 
{
    @Autowired
    private DispatchPumpSiteRelationsMapper dispatchPumpSiteRelationsMapper;

    /**
     * 查询机泵 - 站点关联
     * 
     * @param pumpSiteRelationId 机泵 - 站点关联主键
     * @return 机泵 - 站点关联
     */
    @Override
    public DispatchPumpSiteRelations selectDispatchPumpSiteRelationsByPumpSiteRelationId(Long pumpSiteRelationId)
    {
        return dispatchPumpSiteRelationsMapper.selectDispatchPumpSiteRelationsByPumpSiteRelationId(pumpSiteRelationId);
    }

    /**
     * 查询机泵 - 站点关联列表
     * 
     * @param dispatchPumpSiteRelations 机泵 - 站点关联
     * @return 机泵 - 站点关联
     */
    @Override
    public List<DispatchPumpSiteRelations> selectDispatchPumpSiteRelationsList(DispatchPumpSiteRelations dispatchPumpSiteRelations)
    {
        return dispatchPumpSiteRelationsMapper.selectDispatchPumpSiteRelationsList(dispatchPumpSiteRelations);
    }

    /**
     * 新增机泵 - 站点关联
     * 
     * @param dispatchPumpSiteRelations 机泵 - 站点关联
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.INSERT)
    @Override
    public int insertDispatchPumpSiteRelations(DispatchPumpSiteRelations dispatchPumpSiteRelations)
    {
        return dispatchPumpSiteRelationsMapper.insertDispatchPumpSiteRelations(dispatchPumpSiteRelations);
    }

    /**
     * 修改机泵 - 站点关联
     * 
     * @param dispatchPumpSiteRelations 机泵 - 站点关联
     * @return 结果
     */
    @AutoFill(operation = AutoFillType.UPDATE)
    @Override
    public int updateDispatchPumpSiteRelations(DispatchPumpSiteRelations dispatchPumpSiteRelations)
    {
        return dispatchPumpSiteRelationsMapper.updateDispatchPumpSiteRelations(dispatchPumpSiteRelations);
    }

    /**
     * 批量删除机泵 - 站点关联
     * 
     * @param pumpSiteRelationIds 需要删除的机泵 - 站点关联主键
     * @return 结果
     */
    @Override
    public int deleteDispatchPumpSiteRelationsByPumpSiteRelationIds(Long[] pumpSiteRelationIds)
    {
        return dispatchPumpSiteRelationsMapper.deleteDispatchPumpSiteRelationsByPumpSiteRelationIds(pumpSiteRelationIds);
    }

    /**
     * 删除机泵 - 站点关联信息
     * 
     * @param pumpSiteRelationId 机泵 - 站点关联主键
     * @return 结果
     */
    @Override
    public int deleteDispatchPumpSiteRelationsByPumpSiteRelationId(Long pumpSiteRelationId)
    {
        return dispatchPumpSiteRelationsMapper.deleteDispatchPumpSiteRelationsByPumpSiteRelationId(pumpSiteRelationId);
    }
}
